%h2
  = _("Comments")
  = image_tag "indicator_arrows.gif",:id=>"busy_comment",:style=>"display:none;"
= "<br />"
%table{:style=>"border:1px solid;padding:0px;margin:0px;"}
  %tr
    %td
      %b=_ "Media"
    %td
      %b=_ "Author"
    %td
      %b=_ "Creation"
    %td
      %b=_ "Published"
    %td
      %b=_ "Reviewed"
    %td
    %td
    %td
  - for comment in @comments 
    %tr{:id=>"tr"+comment.id.to_s }
      %td= link_to HTMLEntities.decode_entities(comment.media.title),"/"+comment.media.permalink 
      %td= mail_to comment.email,comment.name
      %td
        =_ '(date)',comment.creation
        = " "
        =_ '(time)',comment.creation
      %td
        = comment.published==1 ? image_tag("tick.png",:style=>"border:0px;") : image_tag("cross.png",:style=>"border:0px;")
      %td
        = comment.reviewed==1 ? image_tag("tick.png",:style=>"border:0px;") : image_tag("cross.png",:style=>"border:0px;")
      %td
        = button_to _('Show'), :action => 'show', :id => comment
      %td
        = button_to _('Edit'), :action => 'edit', :id => comment 
      %td
        = link_to_remote image_tag("cancel.png",:style=>"border:0px;",:title=>_("Delete comment")), :url=>{ :action => 'destroy', :id => comment }, :confirm => _('Are you sure?') , :loading =>"Element.show('busy_comment')",:complete=>"new Effect.Fade('tr#{comment.id}');Element.hide('busy_comment')"
= "<br>"
= will_paginate @comments
= "<br />"
